clearset more off#delimit ;log using "/Users/sebastian/Mac/Argentina/Fraud/paper/replication_materials/first_digit_test", replace text;use "/Users/sebastian/Mac/Argentina/Fraud/paper/replication_materials/real_simulated_votes.dta";tostring radical_clean conservative_clean radical_fraud conservative_fraud radical_1931 conservative_1931 radical_1935 conservative_1935 radical_1940 conservative_1940 conservative_1941 radical_1941, replace;gen lenp_1=length(radical_clean);gen lenp_2=length(conservative_clean);gen lenp_3=length(radical_fraud);gen lenp_4=length(conservative_fraud);gen lenp_5=length(radical_1931);gen lenp_6=length(conservative_1931);gen lenp_7=length(radical_1935);gen lenp_8=length(conservative_1935);gen lenp_9=length(radical_1940);gen lenp_10=length(conservative_1940);gen lenp_11=length(radical_1941);gen lenp_12=length(conservative_1941);gen f_1=substr(radical_clean,1,1);gen f_2=substr(conservative_clean,1,1);gen f_3=substr(radical_fraud,1,1);gen f_4=substr(conservative_fraud,1,1);gen f_5=substr(radical_1931,1,1);gen f_6=substr(conservative_1931,1,1);gen f_7=substr(radical_1935,1,1);gen f_8=substr(conservative_1935,1,1);gen f_9=substr(radical_1940,1,1);gen f_10=substr(conservative_1940,1,1);gen f_11=substr(radical_1941,1,1);gen f_12=substr(conservative_1941,1,1);destring radical_clean conservative_clean radical_fraud conservative_fraud radical_1931 conservative_1931 radical_1935 conservative_1935 radical_1940 conservative_1940 conservative_1941 radical_1941, replace;destring f_1 f_2 f_3 f_4 f_5 f_6 f_7 f_8 f_9 f_10 f_11 f_12, replace;*/ First Digit Test */;sum radical_clean f_1;ttest f_1==3.4402;csgof f_1, expperc(30 17.6 12.5 9.7 7.9 6.8 5.8 5.1 4.6);sum conservative_clean f_2;ttest f_2==3.4402;csgof f_2, expperc(30 17.6 12.5 9.7 7.9 6.8 5.8 5.1 4.6);sum radical_fraud f_3;ttest f_3==3.4402;csgof f_3, expperc(30 17.6 12.5 9.7 7.9 6.8 5.8 5.1 4.6);sum conservative_fraud f_4;ttest f_4==3.4402;csgof f_4, expperc(30 17.6 12.5 9.7 7.9 6.8 5.8 5.1 4.6);sum radical_1931 f_5;ttest f_5==3.4402;csgof f_5, expperc(30 17.6 12.5 9.7 7.9 6.8 5.8 5.1 4.6);sum conservative_1931 f_6;ttest f_6==3.4402;csgof f_6, expperc(30 17.6 12.5 9.7 7.9 6.8 5.8 5.1 4.6);sum radical_1935 f_7;ttest f_7==3.4402;csgof f_7, expperc(30 17.6 12.5 9.7 7.9 6.8 5.8 5.1 4.6);sum conservative_1935 f_8;ttest f_8==3.4402;csgof f_8, expperc(30 17.6 12.5 9.7 7.9 6.8 5.8 5.1 4.6);sum radical_1940 f_9;ttest f_9==3.4402;csgof f_9, expperc(30 17.6 12.5 9.7 7.9 6.8 5.8 5.1 4.6);sum conservative_1940 f_10;ttest f_10==3.4402;csgof f_10, expperc(30 17.6 12.5 9.7 7.9 6.8 5.8 5.1 4.6);sum radical_1941 f_11;ttest f_11==3.4402;csgof f_11, expperc(30 17.6 12.5 9.7 7.9 6.8 5.8 5.1 4.6);sum conservative_1941 f_12;ttest f_12==3.4402;csgof f_12, expperc(30 17.6 12.5 9.7 7.9 6.8 5.8 5.1 4.6);log c; 